home *** CD-ROM | disk | FTP | other *** search
- package symantec.itools.awt;
-
- import java.awt.Canvas;
- import java.awt.Component;
- import java.awt.Dimension;
-
- public abstract class Slider extends Canvas {
- public static final int TICK_LEFT = 0;
- public static final int TICK_RIGHT = 1;
- public static final int TICK_BOTTOM = 0;
- public static final int TICK_TOP = 1;
- public static final int TICK_BOTH = 2;
- public static final int TICK_NONE = 3;
- protected boolean enabled;
- protected int width;
- protected int height;
- protected int style;
- protected int freq;
- protected int min;
- protected int max;
- protected int prevPos;
- protected int curPos;
- protected boolean showBorder;
-
- protected Slider() {
- }
-
- public int getTickStyle() {
- return this.style;
- }
-
- public void setMinValue(int var1) {
- this.min = var1;
- ((Component)this).invalidate();
- }
-
- public int getMinValue() {
- return this.min;
- }
-
- public void setMaxValue(int var1) {
- this.max = var1;
- ((Component)this).invalidate();
- }
-
- public int getMaxValue() {
- return this.max;
- }
-
- public void setTickFreq(int var1) {
- this.freq = var1;
- ((Component)this).invalidate();
- }
-
- public int getTickFreq() {
- return this.freq;
- }
-
- public void setValue(int var1) {
- this.doMove((var1 - this.min) / this.freq, false);
- }
-
- public int getValue() {
- return this.curPos * this.freq + this.min;
- }
-
- public void setShowBorder(boolean var1) {
- this.showBorder = var1;
- ((Component)this).invalidate();
- }
-
- public boolean getShowBorder() {
- return this.showBorder;
- }
-
- public synchronized void enable() {
- super.enable();
- }
-
- public synchronized void disable() {
- super.disable();
- }
-
- public Dimension preferredSize() {
- return new Dimension(this.width, this.height);
- }
-
- protected abstract void doMove(int var1, boolean var2);
- }
-